<template>
    <div >
      <div class="title">热销推荐</div>
      <ul>

          <router-link
              tag="li"
              :to="'/detail/'+item.id"
              class="item border-bottom"
              v-for="item in list"
              :key="item.id">
            <img class="item-img" :src="item.imgUrl" >
            <div class="item-info">
              <p class="item-title">{{item.title}}</p>
              <p class="item-desc">{{item.desc}}</p>
              <button class="item-button">查看详情</button>
            </div>
          </router-link>

      </ul>
    </div>
</template>

<script>
    export default {
        name:'HomeRecommend',
        props:{
            list:Array
        },
        data(){
            return {
/*                recommendList:[{
                    id:'0001',
                    imgUrl:'http://img1.qunarzz.com/sight/p0/1601/3d/3dc7f222d6bca6a790.img.jpg_200x200_e0bb3017.jpg',
                    title:'广州花城汇MAG环球魔幻世界',
                    desc:'长隆野生动物世界'
                },{
                  id:'0002',
                  imgUrl:'http://img1.qunarzz.com/sight/p0/1707/ab/abb70c851caaa6d8a3.img.jpg_200x200_b902dd9e.jpg',
                  title:'广州花城汇MAG环球魔幻世界',
                  desc:'长隆野生动物世界'
                },{
                  id:'0003',
                  imgUrl:'http://img1.qunarzz.com/sight/p0/1601/3d/3dc7f222d6bca6a790.img.jpg_200x200_e0bb3017.jpg',
                  title:'广州花城汇MAG环球魔幻世界',
                  desc:'长隆野生动物世界'
                }]*/
            }
        },
        methods: {}
    }
</script>

<style scoped lang="stylus">
  @import '~styles/mixins.styl'
  .title
    line-height:0.8rem
    margin-top:0.2rem
    background: #eeeeee
    text-indent:.2rem
  .item
    overflow:hidden
    display: flex
    height: 1.9rem
    .item-img
      width: 1.7rem
      height: 1.7rem
      padding: .1rem
    .item-info
      flex:1
      padding:.1rem
      min-width:0
      .item-title
        line-height: .54rem
        font-size: .32rem
        ellipsis()
      .item-desc
        color: #ccc
        line-height: .4rem
        ellipsis()
      .item-button
        background: #ff9300
        padding:0 .2rem
        -webkit-border-radius:.06rem
        -moz-border-radius:.06rem
        border-radius:.06rem
        color: #fff
        line-height .44rem
        margin-bottom:.16rem


</style>
